From b9531e3a7c2a899a9f0e5b9c829eec815b2f5e2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Jan 2018 09:29:05 +0100 Subject: [PATCH] scale: Allocate marks widget along the trough --- gtk/gtkscale.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 536ffdeca9..94165151b6 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -561,8 +561,9 @@ gtk_scale_size_allocate (GtkWidget *widget, GTK_ORIENTATION_VERTICAL, -1, &marks_height, NULL, NULL, NULL); - marks_rect = range_rect; + marks_rect.x = 0; marks_rect.y = 0; + marks_rect.width = range_rect.width; marks_rect.height = marks_height; gtk_widget_size_allocate (priv->top_marks_widget, &marks_rect, -1, &marks_clip); gdk_rectangle_union (out_clip, &marks_clip, out_clip); @@ -574,8 +575,9 @@ gtk_scale_size_allocate (GtkWidget *widget, GTK_ORIENTATION_VERTICAL, -1, &marks_height, NULL, NULL, NULL); - marks_rect = range_rect; - marks_rect.y += range_rect.height; + marks_rect.x = 0; + marks_rect.y = range_rect.y + range_rect.height; + marks_rect.width = range_rect.width; marks_rect.height = marks_height; gtk_widget_size_allocate (priv->bottom_marks_widget, &marks_rect, -1, &marks_clip); gdk_rectangle_union (out_clip, &marks_clip, out_clip); @@ -591,8 +593,8 @@ gtk_scale_size_allocate (GtkWidget *widget, GTK_ORIENTATION_HORIZONTAL, -1, &marks_width, NULL, NULL, NULL); - marks_rect = range_rect; - marks_rect.x -= marks_width; + marks_rect.x = 0; + marks_rect.y = 0; marks_rect.width = marks_width; gtk_widget_size_allocate (priv->top_marks_widget, &marks_rect, -1, &marks_clip); gdk_rectangle_union (out_clip, &marks_clip, out_clip); @@ -605,8 +607,10 @@ gtk_scale_size_allocate (GtkWidget *widget, &marks_width, NULL, NULL, NULL); marks_rect = range_rect; - marks_rect.x += range_rect.width; + marks_rect.x = range_rect.x + range_rect.width; + marks_rect.y = 0; marks_rect.width = marks_width; + marks_rect.height = range_rect.height; gtk_widget_size_allocate (priv->bottom_marks_widget, &marks_rect, -1, &marks_clip); gdk_rectangle_union (out_clip, &marks_clip, out_clip); } -- 2.30.2